package xyz.hubery.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.hubery.domain.AccountDetail;
import xyz.hubery.domain.CashRecharge;
import xyz.hubery.model.R;
import xyz.hubery.service.AccountDetailService;
import xyz.hubery.service.CashRechargeService;

@RestController
@RequestMapping("/accountDetails")
@Api("资金流水控制器")
public class AccountDetailsController {


    @Autowired
    private AccountDetailService accountDetailService;

    @GetMapping("/records")
    @ApiOperation("分页查询GCN充值记录")
    public R<Page<AccountDetail>> findByPage(Long userId,
                                             String userName,
                                             String mobile,
                                             Integer amountStart,
                                             Integer amountEnd,
                                             Long accountId,
                                            String startTime,
                                             String endTime
            , Page<AccountDetail> page) {
        Page<AccountDetail> accountDetailPage = accountDetailService.findPage(userId, userName, mobile, amountStart, amountEnd,accountId, startTime, endTime,  page);
        return R.ok(accountDetailPage);
    }
}
